Field of the Invention
The present invention relates to a technique that extracts a code that exists on a document from image data obtained by scanning the document and processes the image data.
Description of the Related Art
A technique is known, which generates image data by scanning a document, searches for a code (e.g., barcode, two-dimensional code, digital watermark, etc.) from the image data, decodes the code that has been found, and processes the image data in accordance with information that is obtained by decoding. For example, Japanese Patent No. 4861255 has disclosed the technique to read a QR code (registered trademark) from image data that is obtained by scanning a document and to rotate the orientation of the image data by analyzing the rotation state of the image data from the read QR code.
Further, WO2005/062186 has disclosed the technique to change a file name of an image file (or folder name of a folder) that has already been stored in a storage medium, such as a memory card, by using a code, such as a barcode. Specifically, in the case where it is desired to change a file name or a folder name, first, the image file to be processed (or folder to be processed) is selected. After this, the image of a desired code is captured from a code list sheet, a file name (or folder name) is generated by using the results of recognizing the captured code, and the file name (or folder name) is changed.
However, in the case of the technique of Japanese Patent No. 4861255 described above, it is necessary to search for a code from the whole of the image data, and therefore, it takes much time to search for a code. Further, a technique to search for a code from the four corners of image data in the case where a code is searched for from the image data is also known. This technique has a first problem in that wasteful processing results because the positions of the four corners that are determined in advance are always searched, and therefore, the area where no code exists is always searched, or in that it is not possible to find a code in the case where a code exists at a position other than the four corners.
Further, in the case where the configuration is designed so that a code that is extracted from image data is decoded, a file name is generated by using information obtained by the decoding, and the file name is attached to the image data as in WO2005/062186 described above, a second problem such as below will occur. The technique of WO2005/062186 requires to separately prepare a dedicated code list sheet in addition to the image data to be processed, and does not suppose the case where a code is embedded within the image data to be processed. In the case where a code that is embedded within the image data to be processed is utilized, it is necessary to cope with the possibility that a code will be created in the format unique to each image to be processed. In other words, in view of the possibility that various parameters are encoded in various formats, it is necessary to take measures as to how to interpret character strings in the various formats, which are obtained by decoding the parameters.